package client;

import streaming.Call;
import client_gui_chat.ChatDialog;
import client_tree.User;

/**
 * 
 * @author UrosKrkic & Radivoje Popovic
 *
 */
public class ClientBindObject {
	
	private User user;
	private ClientSocketConnection connection;
	private ChatDialog chatDialog;
//	private boolean videoEstablished;
//	private boolean audioEstablished;
//	private boolean videoRequested;
//	private boolean audioRequested;
	private Call call;
	
	public ClientBindObject(User user, ClientSocketConnection connection) {
		this.user = user;
		this.connection = connection;		
	}

	public boolean isDialogOpen() {
		if (chatDialog == null)
			return false;
		
		return true;
	}
	
	public boolean isConnectionActive() {
		if (connection == null) {
			return false;
		}
		
		return true;
	}
	
	public ClientSocketConnection getConnection() {
		return this.connection;
	}
	
	
	public void setChatDialog(ChatDialog dialog) {
		this.chatDialog = dialog;
	}
	
	public void setChatDialogConnection(ClientSocketConnection connection) {
		this.chatDialog.setConnection(connection);
	}
	
	public void setConnection(ClientSocketConnection connection) {
		this.connection = connection;
	}
	
	public ChatDialog getDialog() {
		return this.chatDialog;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

/*
	public boolean isVideoEstablished() {
		return videoEstablished;
	}

	public void setVideoEstablished(boolean videoEstablished) {
		this.videoEstablished = videoEstablished;
	}

	public boolean isAudioEstablished() {
		return audioEstablished;
	}

	public void setAudioEstablished(boolean audioEstablished) {
		this.audioEstablished = audioEstablished;
	}

	public boolean isVideoRequested() {
		return videoRequested;
	}

	public void setVideoRequested(boolean videoRequested) {
		this.videoRequested = videoRequested;
	}

	public boolean isAudioRequested() {
		return audioRequested;
	}

	public void setAudioRequested(boolean audioRequested) {
		this.audioRequested = audioRequested;
	}
*/
	
	public Call getCall() {
		return call;
	}

	public void setCall(Call call) {
		this.call = call;
	}
	

}
